home *** CD-ROM | disk | FTP | other *** search
- /*
- lsam.h Lydian Software Access Method
- standard header file for LSAM system use.
- data structures and other preprocessor definitions
- required for system use.
- Copyright (C) Lydian Software, 1987
- */
- #define EOS '\0' /* END OF STRING CONSTANT */
- #define YES 1 /* yes/no 'boolean' switch values */
- #define NO 0
- /* SYSTEM RETURN CODE VALUES: */
- #include "lsrcodes.h"
- /* SYSTEM KEY LENGTH, PATH STRING LIMITS: */
- #include "lslimits.h"
- /* DATA TYPE DEFINITIONS */
- typedef unsigned int UINT; /* shorthand */
- typedef unsigned char UCHAR;
- typedef unsigned char BOOLEAN;
- typedef unsigned long ULONG;
- typedef struct { /* BASE FILE PARAMETERS STRUCTURE */
- UCHAR fill[1];
- } *LSBFPP; /* POINTER type */
-
- /* ls_open() PARM FILE SWITCH OPTIONS - values for 'env_or_name' switch */
- #define PARM_ENV_VAR YES /* string is an ENV VAR holding parm file pathname */
- #define PARM_NAME NO /* string IS parm file pathname */
-
- /* ls_startbr() OPTIONS - values for 'stype' start type switch */
- #define GTEQ 0 /* request positioning at next greater or equal key*/
- #define EQUAL 1 /* request positioning at equal key only (exact) */
-
- /* SYSTEM REQUEST FUNCTION DECLARATIONS */
-
- void ls_bldixkey(LSBFPP,UINT,UCHAR *); /* build key string service for non-contiguous keys */
- int ls_is_ix_new(LSBFPP,UINT), /* returns YES if selected ix created by this run, else NO */
- ls_bldindx(LSBFPP,UINT), /* build index file for given base file */
- ls_startbr(LSBFPP,UINT,UCHAR *,UCHAR), /* (re)set current record pointer for seq read */
- ls_read(LSBFPP,UINT,UCHAR *), /* 'random' read (by key) */
- ls_readnext(LSBFPP,UINT), /* sequential read (next) logical record, given index */
- ls_readprev(LSBFPP,UINT), /* sequential read (prev) logical record, given index */
- ls_write(LSBFPP), /* write new record */
- ls_rewrite(LSBFPP,UINT,UCHAR *),/* update existing record */
- ls_delete(LSBFPP,UINT,UCHAR *), /* delete existing record */
- ls_close(LSBFPP), /* close base/index file set */
- lsam(void); /* dummy call to force linker inclusion of lsam module */
- LSBFPP ls_open(char *,int,UCHAR *,UCHAR *); /* open base/index file set using generated parm file */